//package demo2;
//
//public class Test {
//    public static void drawMap(Shape shape){
//        shape.draw();
//    }
//
//    public static void main(String[] args) {
//        Rect rect = new Rect();
//        Cycle cycle = new Cycle();
//        Triangle triangle = new Triangle();
//        Flower flower = new Flower();
//
//        Shape[] shapes = {cycle,rect,cycle,rect,triangle,flower};
//        for (Shape shape : shapes){
//            shape.draw();
//        }
//    }
//    public static void main2(String[] args) {
//        Rect rect = new Rect();
//        Cycle cycle = new Cycle();
//        Triangle triangle = new Triangle();
//
//        String[] strings ={"cycle","rect","cycle","rect","triangle"};
//
//        for (String s :strings){
//            if(s.equals("cycle")){
//                cycle.draw();
//            }else if(s.equals("rect")){
//                rect.draw();
//            }else{
//                triangle.draw();
//            }
//        }
//    }
//    public static void main1(String[] args) {
//        Rect rect = new Rect();
//        Cycle cycle = new Cycle();
//        Triangle triangle = new Triangle();
//
//        drawMap(rect);
//        drawMap(cycle);
//        drawMap(triangle);
//    }
//}
